/**
 * Created by kc on 16/6/5.
 */

var envjson     = require('../servertype.json');
var DEV = {
	debug:false,
	murl:'http://mtest.juqingdata.com',
	redis:{
		default: {
			host: "172.16.31.52",
			port: 6379,
			db:1
		}
	},
	wechat:{
		appid:'wxbf3fb3b1dbedad23',
		appkey:'b7bb4ebf4afb276480cdc3bff2360c7d',//key为在微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置
		secret:'3f730d4f6d27b31554607c73aeb8c608',
		mchid:'1369730802',
		notify_url:'http://mtest.juqingdata.com/rest/svcWx/mdPayNotify',
		auth_url:'https://open.weixin.qq.com/connect/oauth2/authorize?appid=(appid)&redirect_uri=(redirect_uri)&response_type=code&scope=(scope)&state=(state)#wechat_redirect'
	},
	wechatCust:{
		appid:'wxbf3fb3b1dbedad23',
		appkey:'b7bb4ebf4afb276480cdc3bff2360c7d',//key为在微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置
		secret:'3f730d4f6d27b31554607c73aeb8c608',
		mchid:'1369730802',
		notify_url:'http://mtest.juqingdata.com/rest/svcWx/mdPayNotify',
		auth_url:'https://open.weixin.qq.com/connect/oauth2/authorize?appid=(appid)&redirect_uri=(redirect_uri)&response_type=code&scope=(scope)&state=(state)#wechat_redirect'
	},
	//自动登录用
	keys:{
		'e53e4c1c931577b1':'8caf2664f383fc6dde581f736b3d65be' //小福圈
	},
	mysql:{
		client: 'mysql',
		connection: {
			host     : '172.16.31.52',
			post	 : '3306',
			user     : 'root',
			password : 'mysqlzjseek123456789',
			database : 'jqins',
			charset  : 'utf8mb4'
		},
		pool: { min: 1, max: 15 },
		debug: true
	},
	upyun:{
		domain:'http://file.cdn.juqingdata.com',
		bucket:'yianbao-juqing-file',
		secret:'Kvgkc76TZk+9HlHh/CGWdJdIx0g=',
		'content-length-range':'1,20480000',
		'allow-file-type':'bmp,png,jpeg,jpg,gif,mp4,mov,3gp,avi,rmvb,flv,mkv',
		'save-key':'/appimg/upload/{year}{mon}{day}/{filemd5}{.suffix}'
	}
};

var PRODUCTION = {
	debug:false,
	murl:'http://m.juqingdata.com',
	redis:{
		default: {
			host: "Jqinsredis2",
			port: 6379,
			password: 'Jqinsredis2'
		}
	},
	wechat:{
		appid:'wxa9911315d4dfece5',
		appkey:'27f31e973fe6b306161437314e5e7948',//key为在微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置
		secret:'702175fac2a9eb83c6d41e822801ab05',
		mchid:'1404119502',
		notify_url:'http://m.juqingdata.com/rest/svcWx/mdPayNotify',
		auth_url:'https://open.weixin.qq.com/connect/oauth2/authorize?appid=(appid)&redirect_uri=(redirect_uri)&response_type=code&scope=(scope)&state=(state)#wechat_redirect'
	},
	wechatCust:{
		appid:'wxbf3fb3b1dbedad23',
		appkey:'b7bb4ebf4afb276480cdc3bff2360c7d',//key为在微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置
		secret:'3f730d4f6d27b31554607c73aeb8c608',
		mchid:'1369730802',
		notify_url:'http://mtest.juqingdata.com/rest/svcWx/mdPayNotify',
		auth_url:'https://open.weixin.qq.com/connect/oauth2/authorize?appid=(appid)&redirect_uri=(redirect_uri)&response_type=code&scope=(scope)&state=(state)#wechat_redirect'
	},
	//自动登录用
	keys:{
		'e53e4c1c931577b1':'8caf2664f383fc6dde581f736b3d65be' //小福圈
	},
	upyun:{
		domain:'http://file.cdn.juqingdata.com',
		bucket:'yianbao-juqing-file',
		secret:'Kvgkc76TZk+9HlHh/CGWdJdIx0g=',
		'content-length-range':'1,20480000',
		'allow-file-type':'bmp,png,jpeg,jpg,gif,mp4,mov,3gp,avi,rmvb,flv,mkv',
		'save-key':'/appimg/upload/{year}{mon}{day}/{filemd5}{.suffix}'
	}
};

if(envjson.device==="test"){
	module.exports = DEV;
}else{
	module.exports = PRODUCTION;
}